/**
 * 攻略详情
 */
var App = require("../libs/network/mvr.js");
var LoadFrame = require("../libs/ui/load-frame.js");
var Imports = require("../libs/utils/imports.js");
var Template = require("../libs/plugins/art-template.js");
var XData = require("../libs/gamepump/xdata.js");
var NativeApp = require("../libs/phonegap/native-bridge.js");
var Url = require("../libs/utils/url.js");
var Stat = require("../libs/utils/stat.js");
var conTpl = Imports("text!../page-layout/article/detail.html");

NativeApp.setTopNavTitle("资讯详情");

var nid = Url.getUrlVal("id");

LoadFrame.reset();

App.addModule('Article',
    App.Model.extend({
        'key': "4",                            //数据协议keycode
        'private': 1,
        'params':"hasextern=1&nid=" + nid
    }),
    App.View.extend({
        container: $("body"),
        //视图渲染回调函数定义
        render:function(dlist){
            var resTpl = Template(conTpl)(XData.articleSlice(dlist[0]));
            this.container.append(resTpl);
        }
    }),true);

App.Requester.init({
    oneTime:true
});
App.Requester.tigger();